<template>
    <div class="app-container">
        <el-table v-loading="loading" :data="cityList">
            <el-table-column label="城市ID" prop="CityId" />
            <el-table-column label="城市中文名称" prop="CityName" />
            <el-table-column label="省份ID" prop="ProvinceId" />
            <el-table-column label="省份中文名称" prop="ProvinceName" />
        </el-table>
        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
            @pagination="getList" />
    </div>
</template>

<script>
import { getCity } from "@/api/hotel/city";
export default {

    data() {
        return {
            loading: true,
            cityList: [],
            queryParams: {
                pageNum: 1,
                pageSize: 10
            },
            // 总条数
            total: 0
        }
    }, created() {
        this.getList();
    }, methods: {
        getList() {
            this.loading = true;
            getCity(this.addDateRange(this.queryParams)).then(response => {
                this.cityList = response.data.Result.Citys;
                this.total = response.data.Result.Count;
                this.loading = false;
            }
            );
        }
    }
}
</script>